<template>
    <view class="pop-view">
        <u-navbar class="slot-bar" height="44" :background="{ background: '#f8f8f8' }" :is-back="false">
            <view class="slot-wrap">
                <!-- <view class="slot-item" @click="goUser">{{ userInfo.nickname ? userInfo.nickname : $t('register') }}</view> -->
                <view class="slot-item" @click="goUser">全部</view>
                <view class="slot-item" @click="spot">景点</view>
                <view class="slot-item" @click="hotel">酒店</view>
                <view class="slot-item"  @click="shop">购物</view>
                <view class="slot-item"  @click="story">故事</view>
            </view>
        </u-navbar>
        
    </view>
</template>

<script>


export default {
    components: {
        
    },
    computed: {
    },
    data() {
        return {
        };
    },
    props: {},
    watch: {},
    created() {
        
    },
    methods: {

        goUser() {
			console.log('首页');
			uni.switchTab({
				url:'/pages/find/index'
			})
        },
        spot() {
			uni.navigateTo({
				url:'/pages/find/spot'
			})
        },
		hotel() {
			uni.navigateTo({
				url:'/pages/find/hotel'
			})
		},
		shop() {
			uni.navigateTo({
				url:'/pages/find/shop'
			})
		},
		story() {
			uni.navigateTo({
				url:'/pages/find/story'
			})
		},
		
        // backHome() {
        //     let currentRoutes = getCurrentPages(); // 获取当前打开过的页面路由数组
        //     let currentRoute = currentRoutes[currentRoutes.length - 1].route; //获取当前页面路由
        //     if (currentRoute.indexOf('pages/mine/donateList') != -1) {
        //         return;
        //     }
        //     uni.$emit('pause');
        //     uni.redirectTo({
        //         url: '/pages/mine/donateList',
        //     });
        //     // this.$u.route('/pages/mine/donateList');
        // },
		// auto(){
		// 	this.$store.commit('setHasLogin', false);
		// 	this.$store.commit('updateUserInfo', {});
		// 	uni.removeStorageSync('userInfo');
		// 	uni.removeStorageSync('token');
		// 	uni.reLaunch({
		// 		url: '/pages/login/index',
		// 	});
		// }
    },
};
</script>

<style lang="scss" scope>
.slot-wrap {
    width: 750rpx;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
	font-size: 30rpx;
	opacity: 0.8;
    .slot-item {
		border: 1rpx solid red;
        width: 25%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f8f8;
        color: #000000;
    }
    // padding-right: 25rpx;
    // .slot-wrap-left {
    //     image {
    //         width: 270rpx;
    //         height: 60px;
    //     }
    // }
}
.slot-bar {
    ::v-deep {
        .u-navbar-fixed {
            width: 750rpx;
            margin: auto;
        }
    }
}
</style>
